#ifndef DSPSIMULATOR_DOUBLEREG_H
#define DSPSIMULATOR_DOUBLEREG_H

#include <vector>
#include "dspSimulator/operand/operand.h"

namespace dspsimulator {
    class DoubleReg : public Operand {
    private:
        RegKind m_reg_lo;
        RegKind m_reg_hi;
    public:
        DoubleReg(RegKind reg_lo, RegKind reg_hi) :
                m_reg_lo(reg_lo), m_reg_hi(reg_hi), Operand(OperandKind::TWO_REG) {}

        DoubleReg(const DoubleReg &) = default;

        DoubleReg(DoubleReg &&) = default;

        DoubleReg &operator=(const DoubleReg &) = default;

        DoubleReg &operator=(DoubleReg &&) = default;

        ~DoubleReg() override = default;

        std::vector<RegKind> regs() const {
            return {m_reg_lo, m_reg_hi};
        }

        std::string to_string() const override {
            std::string str = reg_names[static_cast<u32>(m_reg_lo)];
            str += ":";
            str += reg_names[static_cast<u32>(m_reg_hi)];
            return str;
        }
    };
}
#endif //DSPSIMULATOR_DOUBLEREG_H
